package com.mjh.zhujianju.enums;

/**
 * 是否@ALL
 *@ClassName: SupervisionDiscussIsAll 
 * @Description 
 * @author wangdong
 * @date 2018年8月28日 下午11:59:06   
 * @version V1.0
 */
public enum SupervisionDiscussIsAll {

	YES("1","@所有人"),
	NO("2","个人");

    private String code;
    private String name;

    SupervisionDiscussIsAll(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static SupervisionDiscussIsAll[] getEnums(){
        return SupervisionDiscussIsAll.values();
    }

    public static String getName(String code){
        if(code == null){
            return null;
        }

        for (SupervisionDiscussIsAll SupervisionEnum : SupervisionDiscussIsAll.values()){
            if(code.equals(SupervisionEnum.getCode())){
                return SupervisionEnum.getName();
            }
        }

        return null;
    }
}
